////////////////////////////////////////////////////////////
// Workfile : Side.h
// Author : Andreas Lehner
// Date : 29.10.2012
// Description : class Side is an abstract class and
// builds the basis for the classe Wall and Door
// holds information about the length of one side and
// to which room it belongs to
// Remarks : 0
// Revision : 1
////////////////////////////////////////////////////////////
#ifndef SIDE_H
#define SIDE_H

#include <iostream>
#include "Object.h"

class Room;

class Side : public Object {
public:
	//constructors
	Side() : mLength(0), mParent(0) {};
	Side(size_t length) : mLength(length), mParent(0) {};
	//set and get the length of one side
	size_t getLength() const { return mLength; };
	void setLength(size_t length) { mLength = length; };
	//set to which room the side belongs
	void setParent(Room const * r) { mParent = r; };
	//set and get known if this side has a neighbour, needed for Door
	virtual void setNeighbour( Room* neighbour ) = 0;
	virtual bool hasNeighbour() const = 0;
	//print function
	virtual void Print(size_t pos = 0) const = 0;
	//clone a side for copying a room
	virtual Side * clone() const = 0;

private:
	size_t mLength;
	Room const * mParent;
};

#endif